package com.adminsystem.java.common;

public enum ResultCode {
    SUCCESS(200, "操作成功"),
    FAILED(500, "操作失败"),
    VALIDATE_FAILED(400, "参数校验失败"),
    UNAUTHORIZED(401, "暂未登录或token已经过期"),
    FORBIDDEN(403, "没有相关权限"),
    USERNAME_EXIST(4001, "用户名已存在"),
    EMAIL_EXIST(4002, "邮箱已存在"),
    USERNAME_NOT_EXIST(4003, "用户名不存在"),
    PASSWORD_ERROR(4004, "密码错误"),
    USER_DISABLED(4005, "用户已被禁用")

    ;


    private final int code;
    private final String message;

    ResultCode(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
} 
